package com.qingxin.wuye.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * WyRoom entity. 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wy_room")
public class WyRoom extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {
	private static final long serialVersionUID = 2605810810537962972L;
	// Fields

	private String roomid;
	private WyBuilding wyBuilding;
	private String roomCode;
	private BigDecimal buildingArea;
	private BigDecimal roomArea;
	private BigDecimal publicArea;
	private Integer tollTarget;
	private Integer floorNum;
	private String address;
	private String roomStatus;
	private String roomType;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date checkinDate;
	private Integer leaseStatus;
	private String ownership;
	private String roomUse;
	private String decorative;
	private String unitNo;
	private String orientation;
	private Integer pact;
	private BigDecimal rent;
	private BigDecimal mgrfee;
	private BigDecimal price;
	private BigDecimal totalPrice;
	private String leaseContractNo;
	private String remark;
	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;

	private String gardenName;
	private String buildingName;
	
	// Constructors

	/** default constructor */
	public WyRoom() {
	}
	
	public WyRoom(String roomid) {
		this.roomid = roomid;
	}


	public WyRoom(String roomid, String roomCode, BigDecimal buildingArea,
			BigDecimal roomArea, BigDecimal publicArea, Integer tollTarget,
			Integer floorNum, String address, String roomStatus,
			String roomType, Date checkinDate, Integer leaseStatus,
			String ownership, String roomUse, String decorative, String unitNo,
			String orientation, Integer pact, BigDecimal rent, BigDecimal mgrfee,
			BigDecimal price, BigDecimal totalPrice, String leaseContractNo,
			String remark, String gardenName, String buildingName) {
		this.roomid = roomid;
		this.roomCode = roomCode;
		this.buildingArea = buildingArea;
		this.roomArea = roomArea;
		this.publicArea = publicArea;
		this.tollTarget = tollTarget;
		this.floorNum = floorNum;
		this.address = address;
		this.roomStatus = roomStatus;
		this.roomType = roomType;
		this.checkinDate = checkinDate;
		this.leaseStatus = leaseStatus;
		this.ownership = ownership;
		this.roomUse = roomUse;
		this.decorative = decorative;
		this.unitNo = unitNo;
		this.orientation = orientation;
		this.pact = pact;
		this.rent = rent;
		this.mgrfee = mgrfee;
		this.price = price;
		this.totalPrice = totalPrice;
		this.leaseContractNo = leaseContractNo;
		this.remark = remark;
		this.gardenName = gardenName;
		this.buildingName = buildingName;
	}


	/** full constructor */
	public WyRoom(WyBuilding wyBuilding, String roomCode, BigDecimal buildingArea,
			BigDecimal roomArea, BigDecimal publicArea, Integer tollTarget,
			Integer floorNum, String address, String roomStatus,
			String roomType, Date checkinDate, Integer leaseStatus,
			String ownership, String roomUse, String decorative, String unitNo,
			String orientation, Integer pact, BigDecimal rent, BigDecimal mgrfee,
			BigDecimal price, BigDecimal totalPrice, String leaseContractNo,
			String remark, String createBy, Date createTime,
			String updateBy, Date updateTime) {
		this.wyBuilding = wyBuilding;
		this.roomCode = roomCode;
		this.buildingArea = buildingArea;
		this.roomArea = roomArea;
		this.publicArea = publicArea;
		this.tollTarget = tollTarget;
		this.floorNum = floorNum;
		this.address = address;
		this.roomStatus = roomStatus;
		this.roomType = roomType;
		this.checkinDate = checkinDate;
		this.leaseStatus = leaseStatus;
		this.ownership = ownership;
		this.roomUse = roomUse;
		this.decorative = decorative;
		this.unitNo = unitNo;
		this.orientation = orientation;
		this.pact = pact;
		this.rent = rent;
		this.mgrfee = mgrfee;
		this.price = price;
		this.totalPrice = totalPrice;
		this.leaseContractNo = leaseContractNo;
		this.remark = remark;
		this.createBy = createBy;
		this.createTime = createTime;
		this.updateBy = updateBy;
		this.updateTime = updateTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "roomid", unique = true, nullable = false, length = 32)
	public String getRoomid() {
		return this.roomid;
	}

	public void setRoomid(String roomid) {
		this.roomid = roomid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "buildingid")
	@JsonIgnore
	public WyBuilding getWyBuilding() {
		return this.wyBuilding;
	}

	public void setWyBuilding(WyBuilding wyBuilding) {
		this.wyBuilding = wyBuilding;
	}

	@Column(name = "room_code", length = 50)
	public String getRoomCode() {
		return this.roomCode;
	}

	public void setRoomCode(String roomCode) {
		this.roomCode = roomCode;
	}

	@Column(name = "building_area", precision = 12, scale = 2)
	public BigDecimal getBuildingArea() {
		return this.buildingArea;
	}

	public void setBuildingArea(BigDecimal buildingArea) {
		this.buildingArea = buildingArea;
	}

	@Column(name = "room_area", precision = 12, scale = 2)
	public BigDecimal getRoomArea() {
		return this.roomArea;
	}

	public void setRoomArea(BigDecimal roomArea) {
		this.roomArea = roomArea;
	}

	@Column(name = "public_area", precision = 12, scale = 2)
	public BigDecimal getPublicArea() {
		return this.publicArea;
	}

	public void setPublicArea(BigDecimal publicArea) {
		this.publicArea = publicArea;
	}

	@Column(name = "toll_target")
	public Integer getTollTarget() {
		return this.tollTarget;
	}

	public void setTollTarget(Integer tollTarget) {
		this.tollTarget = tollTarget;
	}

	@Column(name = "floor_num")
	public Integer getFloorNum() {
		return this.floorNum;
	}

	public void setFloorNum(Integer floorNum) {
		this.floorNum = floorNum;
	}

	@Column(name = "address", length = 500)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "room_status", length = 50)
	public String getRoomStatus() {
		return this.roomStatus;
	}

	public void setRoomStatus(String roomStatus) {
		this.roomStatus = roomStatus;
	}

	@Column(name = "room_type", length = 50)
	public String getRoomType() {
		return this.roomType;
	}

	public void setRoomType(String roomType) {
		this.roomType = roomType;
	}

	@Column(name = "checkin_date", length = 23)
	public Date getCheckinDate() {
		return this.checkinDate;
	}

	public void setCheckinDate(Date checkinDate) {
		this.checkinDate = checkinDate;
	}

	@Column(name = "lease_status")
	public Integer getLeaseStatus() {
		return this.leaseStatus;
	}

	public void setLeaseStatus(Integer leaseStatus) {
		this.leaseStatus = leaseStatus;
	}

	@Column(name = "ownership", length = 50)
	public String getOwnership() {
		return this.ownership;
	}

	public void setOwnership(String ownership) {
		this.ownership = ownership;
	}

	@Column(name = "room_use", length = 50)
	public String getRoomUse() {
		return this.roomUse;
	}

	public void setRoomUse(String roomUse) {
		this.roomUse = roomUse;
	}

	@Column(name = "decorative", length = 50)
	public String getDecorative() {
		return this.decorative;
	}

	public void setDecorative(String decorative) {
		this.decorative = decorative;
	}

	@Column(name = "unit_no", length = 50)
	public String getUnitNo() {
		return this.unitNo;
	}

	public void setUnitNo(String unitNo) {
		this.unitNo = unitNo;
	}

	@Column(name = "orientation", length = 50)
	public String getOrientation() {
		return this.orientation;
	}

	public void setOrientation(String orientation) {
		this.orientation = orientation;
	}

	@Column(name = "pact")
	public Integer getPact() {
		return this.pact;
	}

	public void setPact(Integer pact) {
		this.pact = pact;
	}

	@Column(name = "rent", precision = 12, scale = 2)
	public BigDecimal getRent() {
		return this.rent;
	}

	public void setRent(BigDecimal rent) {
		this.rent = rent;
	}

	@Column(name = "mgrfee", precision = 12, scale = 2)
	public BigDecimal getMgrfee() {
		return this.mgrfee;
	}

	public void setMgrfee(BigDecimal mgrfee) {
		this.mgrfee = mgrfee;
	}

	@Column(name = "price", precision = 12, scale = 2)
	public BigDecimal getPrice() {
		return this.price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	@Column(name = "total_price", precision = 12, scale = 2)
	public BigDecimal getTotalPrice() {
		return this.totalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	@Column(name = "lease_contract_no", length = 50)
	public String getLeaseContractNo() {
		return this.leaseContractNo;
	}

	public void setLeaseContractNo(String leaseContractNo) {
		this.leaseContractNo = leaseContractNo;
	}

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "create_by", length = 50)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_by", length = 50)
	public String getUpdateBy() {
		return this.updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "update_time", length = 23)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}


	@Transient
	public String getGardenName() {
		return gardenName;
	}
	public void setGardenName(String gardenName) {
		this.gardenName = gardenName;
	}

	@Transient
	public String getBuildingName() {
		return buildingName;
	}
	public void setBuildingName(String buildingName) {
		this.buildingName = buildingName;
	}

	
	
	
}